<?php

namespace App\SubApps\Account\Controllers;

use Hilaoyu\LaravelExtend\ControllerBase;
use Illuminate\Http\Request;


class AuthController extends ControllerBase
{
    public function loginSuccess(Request $request){
        comResponse()->success('登录成功');
        $oauth_data = $request->offsetGet('oauth');
        if(!empty($oauth_data)){
            return comResponse()->redirect(route('web.oauth.redirect-back',['id'=>data_get($oauth_data,'app.id',''),'back_url'=>data_get($oauth_data,'back_url',''),'state'=>data_get($oauth_data,'state','')]));
        }

        return $this->renderingResponse();
    }
}
